From: Felix Fietkau Date: Wed, 23 Jun 2021 08:01:41 +0000 (+0200) Subject: bridge: bring up pre-existing vlans on hotplug as well X-Git-Url: http://git.openwrt.org/%22http:/oss.oetiker.ch/rrdtool//%22/%22http:/oss.oetiker.ch/rrdtool/%22?a=commitdiff_plain;h=4e92ea74273f7d569f2be67066f9ebd33cf2ecad;p=project%2Fnetifd.git bridge: bring up pre-existing vlans on hotplug as well When adding a member to an existing VLAN, it needs to be updated as well Signed-off-by: Felix Fietkau --- diff --git a/bridge.c b/bridge.c index 925cfe4..4f3fe35 100644 --- a/bridge.c +++ b/bridge.c @@ -704,11 +704,6 @@ bridge_hotplug_get_vlan(struct bridge_state *bst, unsigned int vid) INIT_LIST_HEAD(&vlan->hotplug_ports); vlist_add(&bst->dev.vlans, &vlan->node, &vlan->vid); vlan->node.version = -1; - if (!vlan->pending) - return vlan; - - vlan->pending = false; - bridge_set_vlan_state(bst, vlan, true); return vlan; } @@ -754,6 +749,11 @@ bridge_hotplug_set_member_vlans(struct bridge_state *bst, struct blob_attr *vlan if (!vlan) continue; + if (vlan->pending) { + vlan->pending = false; + bridge_set_vlan_state(bst, vlan, true); + } + if (end && *end) { if (*end != ':') continue;